package com.rd.student.jike.class1.fangzhou.day0731;

import java.util.ArrayList;

public class Test03 {
    public static void main(String[] args) {
        ArrayList<Integer> List = new ArrayList<>(20);
        for (int i = 0; i < 20; i++) {
            int random = (int) (Math.random() * 50);
            if (List.contains(random)) {
                i--;
                continue;
            }
            List.add(random);
        }
        System.out.println(List);
    }
}
